/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.dlsu.pdfgen.gui;

import javax.swing.JOptionPane;

/**
 *
 * @author ding
 */
public class ReferenceFormatter extends javax.swing.JFrame {
    public String result="null";
    /**
     * Creates new form ReferenceFormatter
     */
    public ReferenceFormatter() {
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel4 = new javax.swing.JPanel();
        jComboBox1 = new javax.swing.JComboBox();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel1 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        bookTitle = new javax.swing.JTextField();
        bookPublisher = new javax.swing.JTextField();
        bookCity = new javax.swing.JTextField();
        bookYear = new javax.swing.JTextField();
        bookChapter = new javax.swing.JTextField();
        bookPage = new javax.swing.JTextField();
        jLabel7 = new javax.swing.JLabel();
        bookAuthor = new javax.swing.JTextField();
        bookCancel = new javax.swing.JButton();
        bookOk = new javax.swing.JButton();
        jPanel2 = new javax.swing.JPanel();
        jLabel8 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        jLabel14 = new javax.swing.JLabel();
        magName = new javax.swing.JTextField();
        magArticle = new javax.swing.JTextField();
        magDateM = new javax.swing.JTextField();
        magVolume = new javax.swing.JTextField();
        magPage = new javax.swing.JTextField();
        magAuthor = new javax.swing.JTextField();
        jButton3 = new javax.swing.JButton();
        jButton4 = new javax.swing.JButton();
        magDateD = new javax.swing.JTextField();
        magDateY = new javax.swing.JTextField();
        jPanel3 = new javax.swing.JPanel();
        jLabel15 = new javax.swing.JLabel();
        jLabel16 = new javax.swing.JLabel();
        jLabel17 = new javax.swing.JLabel();
        jLabel18 = new javax.swing.JLabel();
        jLabel19 = new javax.swing.JLabel();
        jLabel20 = new javax.swing.JLabel();
        jLabel21 = new javax.swing.JLabel();
        jLabel22 = new javax.swing.JLabel();
        newsName = new javax.swing.JTextField();
        newsLocation = new javax.swing.JTextField();
        newsArticle = new javax.swing.JTextField();
        newsPage = new javax.swing.JTextField();
        newsSection = new javax.swing.JTextField();
        newsEdition = new javax.swing.JTextField();
        newsAuthor = new javax.swing.JTextField();
        jButton5 = new javax.swing.JButton();
        jButton6 = new javax.swing.JButton();
        newsPublishedM = new javax.swing.JTextField();
        newsPublishedD = new javax.swing.JTextField();
        newsPublishedY = new javax.swing.JTextField();
        jPanel6 = new javax.swing.JPanel();
        jLabel23 = new javax.swing.JLabel();
        jLabel24 = new javax.swing.JLabel();
        jLabel25 = new javax.swing.JLabel();
        jLabel26 = new javax.swing.JLabel();
        jLabel27 = new javax.swing.JLabel();
        jLabel28 = new javax.swing.JLabel();
        jLabel29 = new javax.swing.JLabel();
        webURL = new javax.swing.JTextField();
        webPage = new javax.swing.JTextField();
        webWeb = new javax.swing.JTextField();
        webSponsor = new javax.swing.JTextField();
        webCreatedM = new javax.swing.JTextField();
        webAccessedM = new javax.swing.JTextField();
        webAuthor = new javax.swing.JTextField();
        jButton9 = new javax.swing.JButton();
        jButton10 = new javax.swing.JButton();
        webCreatedD = new javax.swing.JTextField();
        webCreatedY = new javax.swing.JTextField();
        webAccessedD = new javax.swing.JTextField();
        webAccessedY = new javax.swing.JTextField();
        jPanel8 = new javax.swing.JPanel();
        jLabel30 = new javax.swing.JLabel();
        jLabel31 = new javax.swing.JLabel();
        jLabel32 = new javax.swing.JLabel();
        jLabel33 = new javax.swing.JLabel();
        jLabel34 = new javax.swing.JLabel();
        jLabel35 = new javax.swing.JLabel();
        jLabel36 = new javax.swing.JLabel();
        journalName = new javax.swing.JTextField();
        journalArticle = new javax.swing.JTextField();
        journalYear = new javax.swing.JTextField();
        journalVolume = new javax.swing.JTextField();
        journalIssue = new javax.swing.JTextField();
        journalPage = new javax.swing.JTextField();
        journalAuthor = new javax.swing.JTextField();
        jButton11 = new javax.swing.JButton();
        jButton12 = new javax.swing.JButton();
        jPanel9 = new javax.swing.JPanel();
        jLabel37 = new javax.swing.JLabel();
        jLabel38 = new javax.swing.JLabel();
        jLabel39 = new javax.swing.JLabel();
        jLabel40 = new javax.swing.JLabel();
        jLabel41 = new javax.swing.JLabel();
        jLabel42 = new javax.swing.JLabel();
        jLabel43 = new javax.swing.JLabel();
        filmTitle = new javax.swing.JTextField();
        filmDistributor = new javax.swing.JTextField();
        filmCity = new javax.swing.JTextField();
        filmCountry = new javax.swing.JTextField();
        filmMain = new javax.swing.JTextField();
        jButton13 = new javax.swing.JButton();
        jButton14 = new javax.swing.JButton();
        jLabel44 = new javax.swing.JLabel();
        filmYear = new javax.swing.JTextField();
        jLabel45 = new javax.swing.JLabel();
        filmDirector = new javax.swing.JTextField();
        filmType = new javax.swing.JComboBox();
        filmMedium = new javax.swing.JComboBox();
        jLabel46 = new javax.swing.JLabel();

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] {"APA", "MLA"}));

        jLabel1.setText("Book Title");

        jLabel2.setText("Publisher");

        jLabel3.setText("City of Publication");

        jLabel4.setText("Year of Publication");

        jLabel5.setText("Chapter Name");

        jLabel6.setText("Page Number");

        bookYear.setText("YYYY");
        bookYear.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                bookYearMouseClicked(evt);
            }
        });
        bookYear.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                bookYearActionPerformed(evt);
            }
        });

        bookChapter.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                bookChapterActionPerformed(evt);
            }
        });

        jLabel7.setText("Author Names");

        bookCancel.setText("Cancel");
        bookCancel.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                bookCancelActionPerformed(evt);
            }
        });

        bookOk.setText("OK");
        bookOk.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                bookOkActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addGroup(jPanel1Layout.createSequentialGroup()
                                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                        .addComponent(jLabel7)
                                        .addComponent(jLabel6))
                                    .addGap(47, 47, 47)
                                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addComponent(bookPage)
                                        .addComponent(bookAuthor)))
                                .addGroup(jPanel1Layout.createSequentialGroup()
                                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addComponent(jLabel4)
                                        .addComponent(jLabel5))
                                    .addGap(26, 26, 26)
                                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addComponent(bookChapter)
                                        .addGroup(jPanel1Layout.createSequentialGroup()
                                            .addComponent(bookYear, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGap(0, 192, Short.MAX_VALUE)))))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel1)
                                    .addComponent(jLabel2)
                                    .addComponent(jLabel3))
                                .addGap(29, 29, 29)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                    .addComponent(bookCity, javax.swing.GroupLayout.DEFAULT_SIZE, 222, Short.MAX_VALUE)
                                    .addComponent(bookTitle, javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(bookPublisher, javax.swing.GroupLayout.Alignment.LEADING))))
                        .addGap(0, 17, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addComponent(bookOk)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(bookCancel)))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(31, 31, 31)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1)
                    .addComponent(bookTitle, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(bookPublisher, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel3)
                    .addComponent(bookCity, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel4)
                    .addComponent(bookYear, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel5)
                    .addComponent(bookChapter, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel6)
                    .addComponent(bookPage, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel7)
                    .addComponent(bookAuthor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 56, Short.MAX_VALUE)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(bookCancel)
                    .addComponent(bookOk))
                .addContainerGap())
        );

        jTabbedPane1.addTab("Book", jPanel1);

        jLabel8.setText("Magazine Name");

        jLabel10.setText("Article Title");

        jLabel11.setText("Date Published");

        jLabel12.setText("Volume");

        jLabel13.setText("Page Number(s)");

        jLabel14.setText("Author(s)");

        magDateM.setText("MM");

        magVolume.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                magVolumeActionPerformed(evt);
            }
        });

        jButton3.setText("OK");
        jButton3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton3ActionPerformed(evt);
            }
        });

        jButton4.setText("Cancel");
        jButton4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton4ActionPerformed(evt);
            }
        });

        magDateD.setText("DD");

        magDateY.setText("YYYY");
        magDateY.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                magDateYActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel9)
                                    .addComponent(jLabel8))
                                .addGap(42, 42, 42)
                                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addGroup(jPanel2Layout.createSequentialGroup()
                                        .addComponent(magDateM, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(magDateD, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(magDateY, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addComponent(magArticle, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 218, Short.MAX_VALUE)
                                    .addComponent(magName, javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(magVolume, javax.swing.GroupLayout.Alignment.TRAILING))
                                .addGap(29, 29, 29))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                                .addComponent(jButton3)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jButton4)
                                .addContainerGap())))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel12)
                            .addComponent(jLabel11)
                            .addComponent(jLabel10)
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel13)
                                    .addComponent(jLabel14))
                                .addGap(40, 40, 40)
                                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(magPage, javax.swing.GroupLayout.PREFERRED_SIZE, 216, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(magAuthor, javax.swing.GroupLayout.PREFERRED_SIZE, 216, javax.swing.GroupLayout.PREFERRED_SIZE))))
                        .addGap(0, 31, Short.MAX_VALUE))))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(28, 28, 28)
                .addComponent(jLabel9)
                .addGap(18, 18, 18)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel8)
                    .addComponent(magName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel10)
                    .addComponent(magArticle, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel11)
                    .addComponent(magDateM, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(magDateD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(magDateY, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel12)
                    .addComponent(magVolume, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel13)
                    .addComponent(magPage, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel14)
                    .addComponent(magAuthor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 79, Short.MAX_VALUE)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButton3)
                    .addComponent(jButton4))
                .addContainerGap())
        );

        jTabbedPane1.addTab("Magazine", jPanel2);

        jLabel15.setText("Newspaper Name");

        jLabel16.setText("Newspaper Location");

        jLabel17.setText("Article Title");

        jLabel18.setText("Date Published");

        jLabel19.setText("Page Number(s)");

        jLabel20.setText("Section");

        jLabel21.setText("Edition");

        jLabel22.setText("Author(s)");

        newsPage.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                newsPageActionPerformed(evt);
            }
        });

        jButton5.setText("OK");
        jButton5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton5ActionPerformed(evt);
            }
        });

        jButton6.setText("Cancel");
        jButton6.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton6ActionPerformed(evt);
            }
        });

        newsPublishedM.setText("Month");
        newsPublishedM.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                newsPublishedMActionPerformed(evt);
            }
        });

        newsPublishedD.setText("DD");
        newsPublishedD.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                newsPublishedDActionPerformed(evt);
            }
        });

        newsPublishedY.setText("YYYY");
        newsPublishedY.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                newsPublishedYActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addComponent(jButton5)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jButton6))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel15)
                            .addComponent(jLabel16)
                            .addComponent(jLabel17)
                            .addComponent(jLabel18)
                            .addComponent(jLabel19)
                            .addComponent(jLabel20)
                            .addComponent(jLabel21)
                            .addComponent(jLabel22))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 17, Short.MAX_VALUE)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addComponent(newsAuthor, javax.swing.GroupLayout.DEFAULT_SIZE, 221, Short.MAX_VALUE)
                                .addComponent(newsEdition, javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(newsSection, javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(newsPage, javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(newsArticle, javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(newsLocation, javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(newsName, javax.swing.GroupLayout.Alignment.LEADING))
                            .addGroup(jPanel3Layout.createSequentialGroup()
                                .addComponent(newsPublishedM, javax.swing.GroupLayout.PREFERRED_SIZE, 62, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(newsPublishedD, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(newsPublishedY, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(19, 19, 19)))
                .addContainerGap())
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addGap(15, 15, 15)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel15)
                    .addComponent(newsName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel16)
                    .addComponent(newsLocation, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel17)
                    .addComponent(newsArticle, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel18)
                    .addComponent(newsPublishedM, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(newsPublishedD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(newsPublishedY, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel19)
                    .addComponent(newsPage, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel20)
                    .addComponent(newsSection, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel21)
                    .addComponent(newsEdition, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel22)
                    .addComponent(newsAuthor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButton5)
                    .addComponent(jButton6))
                .addContainerGap(27, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("Newspaper", jPanel3);

        jLabel23.setText("Website URL");

        jLabel24.setText("Page Title");

        jLabel25.setText("Web Site Title");

        jLabel26.setText("Sponsor/Publisher");

        jLabel27.setText("Date Created");

        jLabel28.setText("Date Accessed");

        jLabel29.setText("Author(s)");

        webSponsor.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                webSponsorActionPerformed(evt);
            }
        });

        webCreatedM.setText("Month");
        webCreatedM.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                webCreatedMActionPerformed(evt);
            }
        });

        webAccessedM.setText("Month");

        jButton9.setText("OK");
        jButton9.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton9ActionPerformed(evt);
            }
        });

        jButton10.setText("Cancel");
        jButton10.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton10ActionPerformed(evt);
            }
        });

        webCreatedD.setText("DD");
        webCreatedD.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                webCreatedDActionPerformed(evt);
            }
        });

        webCreatedY.setText("YYYY");
        webCreatedY.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                webCreatedYActionPerformed(evt);
            }
        });

        webAccessedD.setText("DD");

        webAccessedY.setText("YYYY");

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel6Layout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addComponent(jButton9)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jButton10))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel6Layout.createSequentialGroup()
                        .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel23)
                            .addComponent(jLabel24)
                            .addComponent(jLabel25)
                            .addComponent(jLabel26)
                            .addComponent(jLabel27)
                            .addComponent(jLabel28)
                            .addComponent(jLabel29))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 33, Short.MAX_VALUE)
                        .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel6Layout.createSequentialGroup()
                                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(webCreatedM, javax.swing.GroupLayout.DEFAULT_SIZE, 72, Short.MAX_VALUE)
                                    .addComponent(webAccessedM))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(webCreatedD, javax.swing.GroupLayout.DEFAULT_SIZE, 33, Short.MAX_VALUE)
                                    .addComponent(webAccessedD))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(webAccessedY, javax.swing.GroupLayout.DEFAULT_SIZE, 33, Short.MAX_VALUE)
                                    .addComponent(webCreatedY)))
                            .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addComponent(webAuthor, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 221, Short.MAX_VALUE)
                                .addComponent(webSponsor, javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(webWeb, javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(webPage, javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(webURL, javax.swing.GroupLayout.Alignment.LEADING)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 24, Short.MAX_VALUE)))
                .addContainerGap())
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addGap(15, 15, 15)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel23)
                    .addComponent(webURL, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel24)
                    .addComponent(webPage, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel25)
                    .addComponent(webWeb, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel26)
                    .addComponent(webSponsor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel27)
                    .addComponent(webCreatedM, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(webCreatedD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(webCreatedY, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel28)
                    .addComponent(webAccessedM, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(webAccessedD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(webAccessedY, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel29)
                    .addComponent(webAuthor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(56, 56, 56)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButton9)
                    .addComponent(jButton10))
                .addContainerGap(27, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("Website", jPanel6);

        jLabel30.setText("Journal Name");

        jLabel31.setText("Article Title");

        jLabel32.setText("Year Published");

        jLabel33.setText("Volume");

        jLabel34.setText("Issue");

        jLabel35.setText("Page Number(s)");

        jLabel36.setText("Author(s)");

        journalYear.setText("YYYY");

        journalVolume.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                journalVolumeActionPerformed(evt);
            }
        });

        journalIssue.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                journalIssueActionPerformed(evt);
            }
        });

        jButton11.setText("OK");
        jButton11.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton11ActionPerformed(evt);
            }
        });

        jButton12.setText("Cancel");
        jButton12.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton12ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel8Layout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addComponent(jButton11)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jButton12))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel8Layout.createSequentialGroup()
                        .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel30)
                            .addComponent(jLabel31)
                            .addComponent(jLabel32)
                            .addComponent(jLabel33)
                            .addComponent(jLabel34)
                            .addComponent(jLabel35)
                            .addComponent(jLabel36))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 37, Short.MAX_VALUE)
                        .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(journalAuthor, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 221, Short.MAX_VALUE)
                            .addComponent(journalPage, javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(journalArticle, javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(journalName, javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addComponent(journalIssue, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 57, Short.MAX_VALUE)
                                .addComponent(journalVolume, javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(journalYear, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(19, 19, 19)))
                .addContainerGap())
        );
        jPanel8Layout.setVerticalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addGap(15, 15, 15)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel30)
                    .addComponent(journalName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel31)
                    .addComponent(journalArticle, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel32)
                    .addComponent(journalYear, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel33)
                    .addComponent(journalVolume, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel34)
                    .addComponent(journalIssue, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel35)
                    .addComponent(journalPage, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel36)
                    .addComponent(journalAuthor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(56, 56, 56)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButton11)
                    .addComponent(jButton12))
                .addContainerGap(27, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("Journal", jPanel8);

        jLabel37.setText("Film Title");

        jLabel38.setText("Type of Film");

        jLabel39.setText("Medium of Film");

        jLabel40.setText("Distributor");

        jLabel41.setText("City of Distribution");

        jLabel42.setText("Country of Origin");

        jLabel43.setText("Main Performer(s)");

        filmDistributor.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                filmDistributorActionPerformed(evt);
            }
        });

        filmCity.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                filmCityActionPerformed(evt);
            }
        });

        jButton13.setText("OK");
        jButton13.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton13ActionPerformed(evt);
            }
        });

        jButton14.setText("Cancel");
        jButton14.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton14ActionPerformed(evt);
            }
        });

        jLabel44.setText("Year Released");

        filmYear.setText("YYYY");
        filmYear.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                filmYearMouseClicked(evt);
            }
        });

        jLabel45.setText("Director Name");

        filmType.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Select a Type", "Motion Picture", "Documentary", "Slide program"}));

        filmMedium.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Select a Medium", "VHS", "Laser Disc", "DVD", "Blue-Ray", "HD-DVD", "Seen in Theater" }));

        javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
        jPanel9.setLayout(jPanel9Layout);
        jPanel9Layout.setHorizontalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel9Layout.createSequentialGroup()
                        .addGap(0, 236, Short.MAX_VALUE)
                        .addComponent(jButton13)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jButton14))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel9Layout.createSequentialGroup()
                        .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel37)
                            .addComponent(jLabel38)
                            .addComponent(jLabel39)
                            .addComponent(jLabel40)
                            .addComponent(jLabel41)
                            .addComponent(jLabel42)
                            .addComponent(jLabel43)
                            .addComponent(jLabel44)
                            .addComponent(jLabel45))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addComponent(filmMain, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 221, Short.MAX_VALUE)
                                .addComponent(filmCountry, javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(filmCity, javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(filmDistributor, javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(filmTitle, javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(filmDirector)
                                .addComponent(filmYear, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addComponent(filmMedium, javax.swing.GroupLayout.Alignment.LEADING, 0, 141, Short.MAX_VALUE)
                                .addComponent(filmType, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                        .addGap(19, 19, 19)))
                .addContainerGap())
        );
        jPanel9Layout.setVerticalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addGap(9, 9, 9)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel37)
                    .addComponent(filmTitle, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel38)
                    .addComponent(filmType, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel39)
                    .addComponent(filmMedium, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel40)
                    .addComponent(filmDistributor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel41)
                    .addComponent(filmCity, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel42)
                    .addComponent(filmCountry, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel43)
                    .addComponent(filmMain, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(14, 14, 14)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel44)
                    .addComponent(filmYear, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(filmDirector, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel45))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jButton14)
                    .addComponent(jButton13))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("Film", jPanel9);

        jLabel46.setText("Format:");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel46)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
            .addComponent(jTabbedPane1, javax.swing.GroupLayout.Alignment.TRAILING)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel46))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jTabbedPane1))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void webCreatedMActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_webCreatedMActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_webCreatedMActionPerformed

    private void webSponsorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_webSponsorActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_webSponsorActionPerformed

    private void newsPageActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_newsPageActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_newsPageActionPerformed

    private void magVolumeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_magVolumeActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_magVolumeActionPerformed

    private void bookChapterActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bookChapterActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_bookChapterActionPerformed

    private void bookYearActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bookYearActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_bookYearActionPerformed

    private void journalVolumeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_journalVolumeActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_journalVolumeActionPerformed

    private void journalIssueActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_journalIssueActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_journalIssueActionPerformed

    private void filmDistributorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_filmDistributorActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_filmDistributorActionPerformed

    private void filmCityActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_filmCityActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_filmCityActionPerformed

    private void webCreatedDActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_webCreatedDActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_webCreatedDActionPerformed

    private void webCreatedYActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_webCreatedYActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_webCreatedYActionPerformed

    private void newsPublishedMActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_newsPublishedMActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_newsPublishedMActionPerformed

    private void newsPublishedDActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_newsPublishedDActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_newsPublishedDActionPerformed

    private void newsPublishedYActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_newsPublishedYActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_newsPublishedYActionPerformed

    private void bookCancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bookCancelActionPerformed
        this.hide();
        // TODO add your handling code here:
    }//GEN-LAST:event_bookCancelActionPerformed

    private void bookOkActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bookOkActionPerformed
        if(bookTitle.getText().equals(""))
            JOptionPane.showMessageDialog(this, "Please enter the book title.", "Inane error",JOptionPane.ERROR_MESSAGE);
        else
        switch (jComboBox1.getSelectedItem().toString()) {
            case "APA":
                //APA format
                if(!bookPage.getText().equals("")) // page number
                result = bookAuthor.getText() + " (" + bookYear.getText() + "). " + 
                        bookChapter.getText() + ". " + bookTitle.getText() + " (pp. " + bookPage.getText() + "). " 
                        + bookCity.getText() + ": " + bookPublisher.getText() + ".";
                else if(bookPage.getText().equals("")) //nno page number
                result = bookAuthor.getText() + " (" + bookYear.getText() + "). " + 
                        bookChapter.getText() + ". " + bookTitle.getText() +". " 
                        + bookCity.getText() + ": " + bookPublisher.getText() + "."; 
                else if(bookPage.getText().equals("") && bookChapter.getText().equals("")) //no chapter and page
                result = bookAuthor.getText() + " (" + bookYear.getText() + "). " +
                        bookTitle.getText() +". " + bookCity.getText() + ": " + 
                        bookPublisher.getText() + ".";    
                else if(!bookPage.getText().equals("")) //no author
                result = "(" + bookYear.getText() + "). " + 
                        bookChapter.getText() + ". " + bookTitle.getText() + " (pp. " + bookPage.getText() + "). " 
                        + bookCity.getText() + ": " + bookPublisher.getText() + ".";
                else if(bookPage.getText().equals("")) //no page number and author
                result = "(" + bookYear.getText() + "). " + bookChapter.getText() + ". " + bookTitle.getText() +". " 
                        + bookCity.getText() + ": " + bookPublisher.getText() + "."; 
                
                //Author.(date).Title(underlined).Place of Publication: Publisher.c
                
                break;
            case "MLA":
                //MLA format
                if(!bookPage.getText().equals("")) //page number
                result = bookAuthor.getText() + ". ''" + bookChapter.getText() + ".''" + bookTitle.getText() + ". " +
                        bookCity.getText() + ": " + bookPublisher.getText() + ", " +
                        bookYear.getText() + ". " + bookPage.getText() + ". Print.";
                        
                else if(bookPage.getText().equals("")) //no page number
                result = bookAuthor.getText() + ". " + bookTitle.getText() + ". " +
                        bookCity.getText() + ": " + bookPublisher.getText() + ", " +
                        bookYear.getText() + ". Print.";
                
                else if(bookPage.getText().equals("") && bookChapter.getText().equals("")) //no chapter and page
                result = bookAuthor.getText() + ". " + bookTitle.getText() + ". " +
                        bookCity.getText() + ": " + bookPublisher.getText() + ", " +
                        bookYear.getText() + ". Print.";
                
                else if(bookAuthor.getText().equals("")) //no author
                result = "''" + bookChapter.getText() + ".''" + bookTitle.getText() + ". " +
                        bookCity.getText() + ": " + bookPublisher.getText() + ", " +
                        bookYear.getText() + ". " + bookPage.getText() + ". Print.";
                //Author. Title. Place of publication: Publisher, date.
                
                else if(bookPage.getText().equals("") && bookAuthor.getText().equals("")) //no page number and author
                result = bookAuthor.getText() + ". " + bookTitle.getText() + ". " +
                        bookCity.getText() + ": " + bookPublisher.getText() + ", " +
                        bookYear.getText() + ". Print.";
                break;
                
        }
        
        
                System.out.println(result);
    }//GEN-LAST:event_bookOkActionPerformed

    private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
        if(magName.getText().equals(""))
        JOptionPane.showMessageDialog(this, "Please enter name of the magazine.", "Inane error",JOptionPane.ERROR_MESSAGE);
        else
        switch (jComboBox1.getSelectedItem().toString()) {
            case "APA":
                if(!magPage.getText().equals("")) //complete
                result = magAuthor.getText() + " (" + magDateY.getText() + ", " + magDateM.getText() + " " +
                        magDateD.getText() + "). " + magArticle.getText() + ". "+ magName.getText() + ", " +
                        magVolume.getText() + ", " + magPage.getText() + ".";
                
                else if(magPage.getText().equals("")) //no page number
                       JOptionPane.showMessageDialog(this, "Please enter the page number.", "Inane error",JOptionPane.ERROR_MESSAGE);
                else if(!magPage.getText().equals("")) //no volume
                result = magAuthor.getText() + " (" + magDateY.getText() + ", " + magDateM.getText() + " " +
                        magDateD.getText() + "). " + magArticle.getText() + ". "+ magName.getText() + ", " + 
                        magPage.getText() + ".";
                else if(!magPage.getText().equals("")) //no author
                result = "(" + magDateY.getText() + ", " + magDateM.getText() + " " +
                        magDateD.getText() + "). " + magArticle.getText() + ". "+ magName.getText() + ", " + 
                        magPage.getText() + ".";
                //APA format
                break;
            case "MLA":
                if(!magPage.getText().equals("")) // with page number
                result = magAuthor.getText() + ". ''" + magArticle.getText() + ".''" + magName.getText() + " Vol. " +
                        magVolume.getText() + ". " + magDateD.getText() + " " + magDateM.getText() + " " + magDateY.getText() + 
                        ": " + magPage.getText() + ". Print.";
                else if(magPage.getText().equals("")) // no page number
               JOptionPane.showMessageDialog(this, "Please enter the page number.", "Inane error",JOptionPane.ERROR_MESSAGE);
                else if(!magPage.getText().equals("")) // no volume
                result = magAuthor.getText() + ". ''" + magArticle.getText() + ".''" + magName.getText() + magDateD.getText() + 
                        " " + magDateM.getText() + " " + magDateY.getText() +  ": " + magPage.getText() + ". Print.";
                else if(!magPage.getText().equals("")) // without authors
                result = "''" + magArticle.getText() + ".''" + magName.getText() + " Vol. " +
                        magVolume.getText() + ". " + magDateD.getText() + " " + magDateM.getText() + " " + magDateY.getText() + 
                        ": " + magPage.getText() + ". Print.";
                
                //MLA format
                break;
        }
        
        System.out.println(result);
    }//GEN-LAST:event_jButton3ActionPerformed

    private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton5ActionPerformed
        if(newsName.getText().equals(""))
        JOptionPane.showMessageDialog(this, "Please enter name of the newspaper.", "Inane error",JOptionPane.ERROR_MESSAGE);
        else if(newsPage.getText().equals(""))
        JOptionPane.showMessageDialog(this, "Please enter the page.", "Inane error",JOptionPane.ERROR_MESSAGE);   
        else
        switch (jComboBox1.getSelectedItem().toString()) {
            case "APA":
                if(!newsName.getText().equals(""))//complete
                    result = newsAuthor.getText() + " (" + newsPublishedY.getText() + ", " + newsPublishedM.getText() +
                            " " + newsPublishedD.getText() + "). " + newsArticle.getText() + ". " + newsName.getText() +
                            ", p. " + newsPage.getText() + "."; 
                
                //APA format
                break;
            case "MLA":
                if(!newsName.getText().equals("")) //complete
                result = newsAuthor.getText() + ". ''" + newsArticle.getText() + ".'' " + newsName.getText() + " " +
                        newsPublishedD.getText() + " " + newsPublishedM.getText() + " " + newsPublishedY.getText() + ", "
                        + newsSection.getText() + ". sec: " + newsPage.getText() + ". Print.";
                //MLA format
                break;
        }
    }//GEN-LAST:event_jButton5ActionPerformed

    private void jButton9ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton9ActionPerformed
        if(webURL.getText().equals(""))
        JOptionPane.showMessageDialog(this, "Please enter the URL.", "Inane error",JOptionPane.ERROR_MESSAGE);
        else if(webPage.getText().equals(""))
        JOptionPane.showMessageDialog(this, "Please enter the name of the page.", "Inane error",JOptionPane.ERROR_MESSAGE);
        else
        switch (jComboBox1.getSelectedItem().toString()) {
            case "APA":
                if(!webSponsor.getText().equals("") || webSponsor.getText().equals("")) //complete
                    result = webAuthor.getText() + " (" + webCreatedY.getText() + ", " + webCreatedM.getText() +
                            " " + webCreatedD.getText() + "). " + webPage.getText() + ". " + webWeb.getText() +
                            ". Retrieved on " + webAccessedM.getText() + " " + webAccessedD.getText() + ", " +
                            webAccessedY.getText() + ", from " + webURL.getText(); 
                else if(webCreatedM.getText().equals("") && webCreatedM.getText().equals("") && webCreatedM.getText().equals("")) //nocreated
                    result = webAuthor.getText() + " (n.d.). " + webPage.getText() + ". " + webWeb.getText() +
                            ". Retrieved on " + webAccessedM.getText() + " " + webAccessedD.getText() + ", " +
                            webAccessedY.getText() + ", from " + webURL.getText(); 
                //APA format
                break;
            case "MLA":
                if(!webSponsor.getText().equals(""))//complete
                    result = webAuthor.getText() + ". ''" + webPage.getText() + ".'' " + webWeb.getText() + ". " +
                            webSponsor.getText() + ", " + webCreatedD.getText() + " " + webCreatedM.getText() + " " +
                            webCreatedY.getText() + ". Web. " + webAccessedD.getText() + " " + webAccessedM.getText() +
                            ". " + webAccessedY.getText() + ". <" + webURL.getText() + ">";
                else if(webSponsor.getText().equals(""))//no sponsor
                    result = webAuthor.getText() + ". ''" + webPage.getText() + ".'' " + webWeb.getText() + ". " + 
                            webCreatedD.getText() + " " + webCreatedM.getText() + " " + webCreatedY.getText() + ". Web. " + 
                            webAccessedD.getText() + " " + webAccessedM.getText() + ". " + webAccessedY.getText() + ". <" + 
                            webURL.getText() + ">";
                else if(webCreatedM.getText().equals("") && webCreatedM.getText().equals("") && webCreatedM.getText().equals("")) //no created
                    result = webAuthor.getText() + ". ''" + webPage.getText() + ".'' " + webWeb.getText() + ". " +
                            webSponsor.getText() + ", Web. " + webAccessedD.getText() + " " + webAccessedM.getText() +
                            ". " + webAccessedY.getText() + ". <" + webURL.getText() + ">";
                
                //MLA format
                break;
        }
    }//GEN-LAST:event_jButton9ActionPerformed

    private void jButton11ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton11ActionPerformed
        if(journalYear.getText().equals(""))
            journalYear.setText("n.d.");
        switch (jComboBox1.getSelectedItem().toString()) {
            case "APA":
                if(!journalName.getText().equals("")) //complete
                    result = journalName.getText() + ". ''" + journalArticle.getText() + ".'' " + journalName.getText() + " " + journalVolume.getText() +
                            ". " + journalIssue.getText() + " (" + journalYear.getText() + "): " + journalPage.getText() + ". Print.";
                else if(journalVolume.getText().equals("")) //no volume
                    result = journalName.getText() + ". ''" + journalArticle.getText() + ".'' " + journalName.getText() + " " + journalIssue.getText() + 
                            " (" + journalYear.getText() + "): " + journalPage.getText() + ". Print.";
                else if(journalIssue.getText().equals("")) //no issue
                    result = journalName.getText() + ". ''" + journalArticle.getText() + ".'' " + journalName.getText() + " " + journalVolume.getText() + 
                            " (" + journalYear.getText() + "): " + journalPage.getText() + ". Print.";
                //APA format
                break;
            case "MLA":
                //MLA format
                break;
        }
    }//GEN-LAST:event_jButton11ActionPerformed

    private void jButton13ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton13ActionPerformed
        switch (jComboBox1.getSelectedItem().toString()) {
            case "APA":
                if(!filmTitle.getText().equals(""));//complete
                    result = filmDirector.getText() + " (Director). (" + filmMain.getText() + "). " + filmTitle.getText() + " [" +
                            filmType.getSelectedItem().toString() + "]. " + filmCountry.getText() + ": " + filmDistributor.getText() + ".";
                //APA format
                break;
            case "MLA":
                if(!filmTitle.getText().equals(""))//complete
                    result = filmTitle.getText() + ". Dir. " + filmDirector.getText() + ". Perf. " + filmMain.getText() + ". " + filmDistributor.getText() +
                            ", " + filmYear.getText() + filmMedium.getSelectedItem().toString();
                //MLA format
                break;
        }
        
        System.out.println(result);
    }//GEN-LAST:event_jButton13ActionPerformed

    private void jButton14ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton14ActionPerformed
        this.hide();
        // TODO add your handling code here:
    }//GEN-LAST:event_jButton14ActionPerformed

    private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed
        this.hide();       
        // TODO add your handling code here:
    }//GEN-LAST:event_jButton4ActionPerformed

    private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton6ActionPerformed
        this.hide();
        // TODO add your handling code here:
    }//GEN-LAST:event_jButton6ActionPerformed

    private void jButton10ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton10ActionPerformed
        this.hide();
        // TODO add your handling code here:
    }//GEN-LAST:event_jButton10ActionPerformed

    private void jButton12ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton12ActionPerformed
        this.hide();
        // TODO add your handling code here:
    }//GEN-LAST:event_jButton12ActionPerformed

    private void magDateYActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_magDateYActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_magDateYActionPerformed

    private void bookYearMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_bookYearMouseClicked
        bookYear.setText(null);
        // TODO add your handling code here:
    }//GEN-LAST:event_bookYearMouseClicked

    private void filmYearMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_filmYearMouseClicked
        filmYear.setText("");
        // TODO add your handling code here:
    }//GEN-LAST:event_filmYearMouseClicked

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /*
         * Set the Nimbus look and feel
         */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /*
         * If Nimbus (introduced in Java SE 6) is not available, stay with the
         * default look and feel. For details see
         * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(ReferenceFormatter.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(ReferenceFormatter.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(ReferenceFormatter.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(ReferenceFormatter.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /*
         * Create and display the form
         */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new ReferenceFormatter().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JTextField bookAuthor;
    private javax.swing.JButton bookCancel;
    private javax.swing.JTextField bookChapter;
    private javax.swing.JTextField bookCity;
    private javax.swing.JButton bookOk;
    private javax.swing.JTextField bookPage;
    private javax.swing.JTextField bookPublisher;
    private javax.swing.JTextField bookTitle;
    private javax.swing.JTextField bookYear;
    private javax.swing.JTextField filmCity;
    private javax.swing.JTextField filmCountry;
    private javax.swing.JTextField filmDirector;
    private javax.swing.JTextField filmDistributor;
    private javax.swing.JTextField filmMain;
    private javax.swing.JComboBox filmMedium;
    private javax.swing.JTextField filmTitle;
    private javax.swing.JComboBox filmType;
    private javax.swing.JTextField filmYear;
    private javax.swing.JButton jButton10;
    private javax.swing.JButton jButton11;
    private javax.swing.JButton jButton12;
    private javax.swing.JButton jButton13;
    private javax.swing.JButton jButton14;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButton4;
    private javax.swing.JButton jButton5;
    private javax.swing.JButton jButton6;
    private javax.swing.JButton jButton9;
    private javax.swing.JComboBox jComboBox1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel27;
    private javax.swing.JLabel jLabel28;
    private javax.swing.JLabel jLabel29;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel30;
    private javax.swing.JLabel jLabel31;
    private javax.swing.JLabel jLabel32;
    private javax.swing.JLabel jLabel33;
    private javax.swing.JLabel jLabel34;
    private javax.swing.JLabel jLabel35;
    private javax.swing.JLabel jLabel36;
    private javax.swing.JLabel jLabel37;
    private javax.swing.JLabel jLabel38;
    private javax.swing.JLabel jLabel39;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel40;
    private javax.swing.JLabel jLabel41;
    private javax.swing.JLabel jLabel42;
    private javax.swing.JLabel jLabel43;
    private javax.swing.JLabel jLabel44;
    private javax.swing.JLabel jLabel45;
    private javax.swing.JLabel jLabel46;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JTextField journalArticle;
    private javax.swing.JTextField journalAuthor;
    private javax.swing.JTextField journalIssue;
    private javax.swing.JTextField journalName;
    private javax.swing.JTextField journalPage;
    private javax.swing.JTextField journalVolume;
    private javax.swing.JTextField journalYear;
    private javax.swing.JTextField magArticle;
    private javax.swing.JTextField magAuthor;
    private javax.swing.JTextField magDateD;
    private javax.swing.JTextField magDateM;
    private javax.swing.JTextField magDateY;
    private javax.swing.JTextField magName;
    private javax.swing.JTextField magPage;
    private javax.swing.JTextField magVolume;
    private javax.swing.JTextField newsArticle;
    private javax.swing.JTextField newsAuthor;
    private javax.swing.JTextField newsEdition;
    private javax.swing.JTextField newsLocation;
    private javax.swing.JTextField newsName;
    private javax.swing.JTextField newsPage;
    private javax.swing.JTextField newsPublishedD;
    private javax.swing.JTextField newsPublishedM;
    private javax.swing.JTextField newsPublishedY;
    private javax.swing.JTextField newsSection;
    private javax.swing.JTextField webAccessedD;
    private javax.swing.JTextField webAccessedM;
    private javax.swing.JTextField webAccessedY;
    private javax.swing.JTextField webAuthor;
    private javax.swing.JTextField webCreatedD;
    private javax.swing.JTextField webCreatedM;
    private javax.swing.JTextField webCreatedY;
    private javax.swing.JTextField webPage;
    private javax.swing.JTextField webSponsor;
    private javax.swing.JTextField webURL;
    private javax.swing.JTextField webWeb;
    // End of variables declaration//GEN-END:variables
}
